(function(global){
    global.TRCKR = global.TRCKR || {};

	TRCKR.getDomainFromUrl = function (url) {
		var domain = url.match(/http(?:s?):\/\/([^\/]+)\//i);
		return domain ? domain[1].match(/[^\.]+\.\w+$/)[0] : false;
	};

	TRCKR.convertJsonToPieArray = function (json) {
		var arrJson = [];
		var i = 0;

		for (var x in json) {
			arrJson[i] = [x, json[x]];
			i++;
		}
		return arrJson;
	};
})(this);